(ns ru.nsu.fit.g7202.test.assert
  (:use clojure.test))

(defn assert-eq [expected actual]
  (let [msg (format "Expected: %s\n  Actual: %s"
                    (pr-str expected)
                    (pr-str actual))]
    (is (= expected actual) msg)))

(defn assert-double-eq [expected actual eps]
  (let [msg (format "Expected: %s\n  Actual: %s"
                    (pr-str expected)
                    (pr-str actual))]
    (is (<= (Math/abs (- expected actual)) eps ) msg)))
